import requests
import json


def get_page_index(url):
    context = requests.get(url)
    if context.status_code == 200:
        pages = context.text
        jp = json.loads(pages)
        print(jp.get("hits"))
    else:
        print("创建链接失败")
search = "街拍"
get_page_index("http://uvs.youdao.com/search?site=photogalaxy.163.com&sort=time&channelid=&q=%BD%D6%C5%C4&length=50&start=0&_=1500432802515")
